import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const settingtUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/repair"
//系统参数api
const settingApi = {
    //列表
    List: function () {
        const data = {

        };
        return request({
            url: settingtUrl + "/systemSetting/list",
            method: "post",
            data: qs.stringify(data)
        });
    },
    //根据参数配置数据
    Batch: function (json, systemId) {
        const data = {
            json,
            systemId
        };
        return request({
            url: settingtUrl + "/systemSetting/batch",
            method: "post",
            data: qs.stringify(data)
        });
    },
    //根据学校编码获取参数配置类型
    Type: function () {
        const data = {

        };
        return request({
            url: settingtUrl + "/systemSetting/type",
            method: "post",
            data: qs.stringify(data)
        });
    },
    //单个修改配置参数数据
    Update: function (code, id, value) {
        const data = {
            code,
            id,
            value
        };
        return request({
            url: settingtUrl + "/systemSetting/update",
            method: "post",
            data: qs.stringify(data)
        });
    },

}
export {
    settingApi
}